spa.shell.main = (function($){
    var
        configMap = {
            main_html : String()+
                '<div class="container spa-shell-main-container">' +
                    '<div class="row">' +
                        '<div class="col-sm-12">'+
                        '</div>'+
                    '</div>'+
                '</div>'
        },
        stateMap = {
            $container : null,
            page : null
        },
        jqueryMap = {

        },setJqueryMap,initModule

    setJqueryMap = function(){
        var $container = stateMap.$container,
            $parent = $(configMap.main_html)
        $container.append($parent)
        $content = $parent.find(".col-sm-12")
        jqueryMap = {
            $container : $container,
            $content : $content
        }

        $.gevent.subscribe($content, spa.events.spaEventGrid, function(event,result){
            var
                page_class = result.page_class
            stateMap.page = page_class($container,result)
        })
    }

    initModule = function($container){
        stateMap.$container = $container
        setJqueryMap()
    }

    return {
        initModule : initModule
    }
}(jQuery))